<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>人员列表</title>
	</head>

<script Language ="javascript"> 
  function getid(){
  var doc=document.getElementsByName('uid');
  //alert("aaaaa");
  for(var i=0;i<doc.length;i++){
  if(doc[i].checked){
   //alert(doc[i].value+"empdetail?uid="+doc[i].value);
   window.location.href='chenhao/empdetail?uid='+doc[i].value; 
 // window.location.reload("empdetail?uid="+doc[i].value);
  break;
  }
  }
  //alert(dc);
  //window.location.href="detail?=uid"+doc;  
}
</script>

	<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" valign="top" background="images/mail_leftbg.gif">
					<img src="images/left-top-right.gif" width="17" height="29" />
				</td>
				<td valign="top" background="images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<div class="titlebt">
									人员列表
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td width="16" valign="top" background="images/mail_rightbg.gif">
					<img src="images/nav-right-bg.gif" width="16" height="29" />
				</td>
			</tr>
			<tr>
				<td valign="middle" background="images/mail_leftbg.gif">
					&nbsp;
				</td>
				<td valign="top" bgcolor="#F7F8F9">
				
					<table width="98%" border="0" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<td colspan="2" valign="top">
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td valign="top">
								&nbsp;
							</td>
						</tr>
						
						<tr>
							<td colspan="2" valign="top">
								<center><span class="left_bt">人员信息</span></center>
								<br>
								<br>
								


<form  action="chenhao/select.action" method="post">
查询条件：
【人员类型】<select name="type" style="border:0;background:transparent; font-size:18px;width:80px;height:20px;" >
		    <option value="0"></option>
		   <option value="1">普通管理员</option>
		   <option value="2">普通员工</option>
          </select>
【所属部门】<select name="did" style="border:0;background:transparent; font-size:18px;width:80px;height:20px;" >
		     <option value="0"></option>
		 <s:iterator value="dlist" var="li">
		  	<option value="${li.deptid}" >${li.deptname}</option>
		  </s:iterator>
		</select>
【人员姓名】<input type="text" name="name" />
【性别】<select name="sex" style="border:0;background:transparent; font-size:18px;width:80px;height:20px;" >
		    <option value="2"></option>
		   <option value="0">男</option>
		   <option value="1">女</option>
          </select>
<input type="submit" value="查询"/>
<br /><br />
<center>
	<table  width="99%" cellspacing="1" cellpadding="3" border="0" bgcolor="#6298e1">
	<tbody>
		<tr>
		    <td  width="40" nowrap="" height="25" background="Admin_Poli.files/th_bg.gif" align="center">
				人员编号
			</td>
			<td width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
				姓名
			</td>
			
			<td  width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
				所属部门
			</td>
			<td width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
			          人员类型
		    </td>
			<td width="60" nowrap="" background="Admin_Poli.files/th_bg.gif" align="center">
			         选择查询   
			</td>
		</tr>
		<s:iterator var="emp" value="list" >
		<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
			<td nowrap="" height="24" align="center">
				${emp.uid}
			</td>
			<td nowrap="" height="24" align="center">
				<s:property value="#emp.uname" />
			</td>
			<td nowrap="" height="24" align="center">
				<s:property value="#emp.UDept.deptname" />
			</td>
			<td nowrap="" height="24" align="center">
			  <s:if test="#emp.utype==1">
				   普通管理员
				</s:if>
				<s:if test="#emp.utype==2">
				   普通员工
				</s:if>
			</td >
			<td nowrap="" height="24" align="center">
			 <input type="radio" value="${emp.uid}" name="uid" id="uid"/></td>
			</tr>
			
			</s:iterator>
			</tbody>
		</table>
		
		<br/>
		  <input type="button" value="详细信息" onclick="getid()"/><br/><br/>  
		</form>
      
		<s:if test="%{page==1}">
			&lt;&lt; 首页 &lt; 上一页
		</s:if>
		<s:else>
		  <a href="<%=basePath %>chenhao/emplist.action?page=1">首页</a>
		  <a href="<%=basePath %>chenhao/emplist.action?page=${page-1}"> 上一页</a>
		</s:else>				
		<s:if test="%{page == totalPages}">
		共${totalPages}页，第${page}页
		   下一页 &gt;
		   末页 &gt;&gt;
		</s:if>
		<s:else>
		共${totalPages}页，第${page}页
		  <a href="<%=basePath %>chenhao/emplist.action?page=${page+1}" target="_top"> 下一页 &gt;</a>
		  <a href="<%=basePath %>chenhao/emplist.action?page=${totalPages}">末页 &gt;&gt;</a>
		</s:else>
		<br />
		<br />
		<br />
		<div style="margin-left:180px">
		<table width="99%" align="center">
			<tr>
				<td class="left_txt">
								<img src="images/icon-mail2.gif" width="16" height="11">
								&nbsp;&nbsp;&nbsp;&nbsp;邮箱：liuyongwade@gmail.com
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								组员：刘勇&nbsp;&nbsp;程署&nbsp;&nbsp;陈皓&nbsp;&nbsp;席晓明&nbsp;&nbsp;刘广云
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;版权所有 侵权必究
							</td>
						</tr>
						</table>
						</div>
   </center>
		
</span>			         
	</body>
</html>
